package cn.newtest.bi.collection.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.risesoft.risebi.collection.model.Catalog;

import org.appfuse.service.Manager;
/**
*
* @author <a href="mailto: wangchui@risesoft.net">王锤</a>
* @version $Revision$
* 
*/
public interface CatalogManager extends Manager {
	List<Catalog> getAllOrderByTabIndex() throws Exception;
	
	/**
	 * 得到统计对象catalog
	 * 
	 * @return
	 * @throws Exception
	 */
	List<Catalog> getCatalogWithSo() throws Exception;
	List<Catalog> getCatalogWithSoByService(String serviceGuid) throws Exception;	
	List<Catalog> getCatalogWithSoByApp(String appGuid, boolean includeVirtual) throws Exception;
	List<Catalog> getCatalogByType(int type) throws Exception;
	
	/**
	 * 根据catalogIdArray数组获得所有统计对象
	 * 
	 * @param catalogIdArray
	 * @return
	 * @throws Exception
	 */
	List<Catalog> getCatalogWithSoByIds(String[] catalogIdArray) throws Exception;
	
	Map getPagedCatalog(Catalog catalog, int start, int limit) throws Exception;
	
	List<Catalog> getCatalogByApp(String appGuid) throws Exception;	
	List<Catalog> getCatalogByApp(String appGuid,String[] filter) throws Exception;
	List<Catalog> getTablesByTemplateGuid(String templateGuid) throws Exception;
	
	public String buildFilterConfig(String tableName) throws Exception;
	public String buildStoreFieldsConfig(String tableName) throws Exception;
	public String buildStoreFieldsCreateConfig(String tableName) throws Exception;
	public String buildGridColumnsConfig(String tableName) throws Exception;
	public String buildGridColumnsWithFilterConfig(String tableName) throws Exception;
	public String buildFormFieldsConfig(String tableName, HashMap<String, Object> dynaBean) throws Exception;
}
